import {Component, OnInit, OnDestroy, Input, Output, EventEmitter, SimpleChanges, OnChanges} from '@angular/core';
@Component({
    selector: 'pl-center',
    templateUrl: 'pl-center.component.html',
    styleUrls: ['pl-center.component.scss'],
})
export class PlCenterComponent implements OnInit, OnDestroy, OnChanges {

    @Input() type;
    @Input() item;
    @Output() itemChange = new EventEmitter<any>();
    constructor() {

    }

    ngOnInit() {

    }

    ngOnChanges(changes:SimpleChanges){
        // console.log(changes,20);
        if(changes.hasOwnProperty('type')){
            this.getNavList();
        }
    }

    setItem(item){
        this.item = item;
        this.itemChange.emit(item);
    }

    getNavList(){
        // console.log(this.index,23);
    }

    ngOnDestroy() {

    }
}
